/*
 * 版权所有 (c) 华为技术有限公司 2022-2022
 */
package com.huawei.cameratest.data;

public class StreamConfig {
    private Integer streamId;
    private Integer bitrateMode;
    private Integer encodeBitrate;
    private Integer iframeInterval;
    private Integer peakRatio;
    private Integer cabacMode;
    private Integer qpMin;
    private Integer qpMax;
    private Byte requestIFrame;
    private Byte ltrReq;
    private Integer elementaryStreamResolution;
    private Byte dropNextFrame;
    private String resolution;
    private Integer svcMode;
    private String format;
    private Integer protocol;
    private Byte fps;

    public Integer getStreamId() {
        return streamId;
    }

    public void setStreamId(Integer streamId) {
        this.streamId = streamId;
    }

    public Integer getBitrateMode() {
        return bitrateMode;
    }

    public void setBitrateMode(String bitrateMode) {
        if ("CBR".equals(bitrateMode)) {
            this.bitrateMode = 0;
        }
        if ("ABR".equals(bitrateMode)) {
            this.bitrateMode = 1;
        }
        if ("VBR".equals(bitrateMode)) {
            this.bitrateMode = 2;
        }
    }

    public Integer getEncodeBitrate() {
        return encodeBitrate;
    }

    public void setEncodeBitrate(String encodeBitrate) {
        if (encodeBitrate == null || "".equals(encodeBitrate)) {
            this.encodeBitrate = null;
        } else {
            this.encodeBitrate = Integer.valueOf(encodeBitrate);
        }
    }

    public void setProtocol(String protocol) {
        if (protocol == null || "H264".equals(protocol)) {
            this.protocol = 0xA001;
        } else {
            this.protocol = 0xA002;
        }
    }

    public Integer getProtocol() {
        return protocol;
    }

    public Byte getFps() {
        return fps;
    }

    public void setFps(String fps) {
        if (fps == null || "".equals(fps)) {
            this.fps = null;
        } else {
            this.fps = Byte.valueOf(fps);
        }
    }

    public Integer getIframeInterval() {
        return iframeInterval;
    }

    public void setIframeInterval(String iframeInterval) {
        if (iframeInterval == null || "".equals(iframeInterval)) {
            this.iframeInterval = null;
        } else {
            this.iframeInterval = Integer.valueOf(iframeInterval);
        }
    }

    public Integer getPeakRatio() {
        return peakRatio;
    }

    public void setPeakRatio(String peakRatio) {
        if (peakRatio == null || "".equals(peakRatio)) {
            this.peakRatio = null;
        } else {
            this.peakRatio = Integer.valueOf(peakRatio);
        }
    }

    public Integer getCabacMode() {
        return cabacMode;
    }

    public void setCabacMode(String cabacMode) {
        if (cabacMode == null || "".equals(cabacMode)) {
            this.cabacMode = null;
        } else {
            this.cabacMode = Integer.valueOf(cabacMode);
        }
    }

    public Integer getQpMin() {
        return qpMin;
    }

    public void setQpMin(String qpMin) {
        if (qpMin == null || "".equals(qpMin)) {
            this.qpMin = null;
        } else {
            this.qpMin = Integer.valueOf(qpMin);
        }
    }

    public Integer getQpMax() {
        return qpMax;
    }

    public void setQpMax(String qpMax) {
        if (qpMax == null || "".equals(qpMax)) {
            this.qpMax = null;
        } else {
            this.qpMax = Integer.valueOf(qpMax);
        }
    }

    public Byte getRequestIFrame() {
        return requestIFrame;
    }

    public void setRequestIFrame(String requestIFrame) {
        if (requestIFrame == null || "".equals(requestIFrame)) {
            this.requestIFrame = null;
        } else {
            this.requestIFrame = Byte.valueOf(requestIFrame);
        }
    }

    public Byte getLtrReq() {
        return ltrReq;
    }

    public void setLtrReq(String ltrReq) {
        if (ltrReq == null || "".equals(ltrReq)) {
            this.ltrReq = null;
        } else {
            this.ltrReq = Byte.valueOf(ltrReq);
        }
    }

    public Integer getElementaryStreamResolution() {
        return elementaryStreamResolution;
    }

    public void setElementaryStreamResolution(Integer elementaryStreamResolution) {
        this.elementaryStreamResolution = elementaryStreamResolution;
    }

    public Byte getDropNextFrame() {
        return dropNextFrame;
    }

    public void setDropNextFrame(String dropNextFrame) {
        if (dropNextFrame == null || "".equals(dropNextFrame)) {
            this.dropNextFrame = null;
        } else {
            this.dropNextFrame = Byte.valueOf(dropNextFrame);
        }
    }

    public String getResolution() {
        return resolution;
    }

    public String getDynamicResolution() {
        return resolution;
    }

    public void setResolution(String resolution) {
        this.resolution = resolution;
    }

    public Integer getSvcMode() {
        return svcMode;
    }

    public void setSvcMode(String svcMode) {
        if (svcMode == null || "".equals(svcMode)) {
            this.svcMode = null;
        } else {
            this.svcMode = Integer.valueOf(svcMode);
        }
    }

    public void setFormat(String format) {
        this.format = format;
    }

    public String getFormat() {
        return format;
    }
}
